package com.kgc.exception;

import lombok.Getter;

/**
 * @Classname TokenException
 * @Description TODO
 * @Date 2021/6/18 9:29
 * @Created by 17402
 */
@Getter
public class TokenException extends RuntimeException{
    /**
     * 序列号
     */
    private static final long serialVersionUID = -4799843811762247414L;
    /**
     * 异常枚举属性
     */
    private TokenExceptionEnum tokenExceptionEnum;

    public TokenException(){

    }
    //继承父类
    public TokenException(String message){
        super(message);
    }

    public TokenException(String message, Throwable cause) {
        super(message, cause);
    }

    public TokenException(Throwable cause) {
        super(cause);
    }

    public TokenException(TokenExceptionEnum tokenExceptionEnum) {
        this.tokenExceptionEnum = tokenExceptionEnum;
    }

    public TokenException(String message, TokenExceptionEnum tokenExceptionEnum) {
        super(message);
        this.tokenExceptionEnum = tokenExceptionEnum;
    }

    public TokenException(String message, Throwable cause, TokenExceptionEnum tokenExceptionEnum) {
        super(message, cause);
        this.tokenExceptionEnum = tokenExceptionEnum;
    }

    public TokenException(Throwable cause, TokenExceptionEnum tokenExceptionEnum) {
        super(cause);
        this.tokenExceptionEnum = tokenExceptionEnum;
    }

    public TokenException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, TokenExceptionEnum tokenExceptionEnum) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.tokenExceptionEnum = tokenExceptionEnum;
    }
}
